﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wucStaticContentList.ascx.cs" Inherits="Modules_WebsiteBackEnd_wucStaticContentList" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:UpdatePanel ID="UpdatePanelList" runat="server">
    <ContentTemplate>

        <script type="text/javascript">
          function MultiRowSelected(index)
          {
            __doPostBack("<%= this.UniqueID %>", "MultiRowSelected");
          }
        </script>

        <table align="center" border="0" cellpadding="0" cellspacing="0" width="790px" class="TableGrayBorder">
            <tbody>                
                <tr>
                    <td align="center">
                        <telerik:RadGrid ID="rgrdGridDataList" runat="server" Skin="WebBlue" Width="790px"
                            PageSize="20" AllowMultiRowSelection="true" AllowPaging="True" ShowGroupPanel="false"
                            AllowAutomaticDeletes=false AllowAutomaticInserts=false AllowAutomaticUpdates=false
                            BorderWidth="0px" GridLines="None" AutoGenerateColumns="false" 
                            OnPageIndexChanged="rgrdGridDataList_PageIndexChanged"
                            AllowSorting="false" OnItemCommand="rgrdGridDataList_ItemCommand">
                            <ClientSettings EnablePostBackOnRowClick="True">
                                <Selecting AllowRowSelect="True" />
                            </ClientSettings>
                            <PagerStyle Mode="NextPrevAndNumeric" NextPagesToolTip="Trang sau" NextPageToolTip="Trang sau"
                                PagerTextFormat="Lựa chọn trang: {4} &amp;nbsp;Trang {0} / {1}, bản ghi {2} - {3} / {5}."
                                PrevPagesToolTip="Trang trước" PrevPageToolTip="Trang trước" />
                            <MasterTableView DataKeyNames="SataticContentID" GridLines=Both>
                                <RowIndicatorColumn Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Resizable="False" Visible="False">
                                    <HeaderStyle Width="20px" />
                                </ExpandCollapseColumn>
                                <EditFormSettings>
                                    <PopUpSettings ScrollBars="None" />
                                </EditFormSettings>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="SataticContentID" HeaderText="ID" ReadOnly="True"
                                        UniqueName="StaticContentID">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" Width="20px" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="StaticContentCode" HeaderText="MÃ"
                                        UniqueName="StaticContentCode" ReadOnly="true" ItemStyle-HorizontalAlign="center">
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle Width="30" />
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="LanguageCode" HeaderText="NGÔN NGỮ" UniqueName="LanguageCode" ReadOnly=true>
                                        <HeaderStyle HorizontalAlign="center" />
                                        <ItemStyle Width="30" HorizontalAlign="center" />
                                    </telerik:GridBoundColumn>
                                 <%--   <telerik:GridBoundColumn DataField="StaticContent" HeaderText="NỘI DUNG" UniqueName="StaticContent" ReadOnly=true>
                                        <HeaderStyle HorizontalAlign="center" />
                                        <ItemStyle  HorizontalAlign=Justify />
                                    </telerik:GridBoundColumn>   --%>                                 
                                    <telerik:GridBoundColumn DataField="Description" HeaderText="MÔ TẢ" UniqueName="Description" ReadOnly=true>
                                        <HeaderStyle HorizontalAlign="center" />
                                        <ItemStyle Width="150" HorizontalAlign=Justify />
                                    </telerik:GridBoundColumn>                                                                        
                                    <telerik:GridClientSelectColumn UniqueName="SelectRow" CommandName="RowClick">
                                        <HeaderStyle HorizontalAlign="Center"/>
                                        <ItemStyle HorizontalAlign="Center"  Width="25px"/>
                                    </telerik:GridClientSelectColumn>
                                    <telerik:GridButtonColumn ButtonType="ImageButton" ImageUrl="~/Images/icons/editrow.png" UniqueName="SubjectEdit" CommandName="RowEdit" Text="Sửa">
                                        <ItemStyle CssClass="MyImageButton"  HorizontalAlign="Center" Width="25px" />
                                    </telerik:GridButtonColumn>                                    
                                  <%--  <telerik:GridButtonColumn ConfirmText="Bạn có muốn xóa bản ghi được lựa chọn?" ConfirmDialogType="RadWindow" 
                                        ConfirmTitle="X&#243;a bản ghi" ButtonType="ImageButton" CommandName="RowDelete" Text="X&#243;a" ImageUrl="~/Images/icons/recyclebin.png"
                                        UniqueName="SubjectDelete">
                                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="25px" />
                                    </telerik:GridButtonColumn>--%>
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </td>
                </tr>
            </tbody>
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
